import { Module } from '@nestjs/common';
import {RedisService} from "./persistent/redis/RedisService";
import {DemoTestOneDao} from "./persistent/dao/DemoTestOneDao";
import {DemoRepository} from "./persistent/repository/DemoRepository";
import {TypeOrmModule} from "@nestjs/typeorm";
import {DemoTestOneEntity} from "./persistent/po/DemoTestOne.entity";

//数据看实体对象
const po = [
    DemoTestOneEntity
]
// dao
const dao = [
    DemoTestOneDao
]
// 暴露的服务
const service = [
    RedisService,DemoRepository
]


@Module({
  imports: [
      TypeOrmModule.forFeature([
          ...po
      ])
  ],
  controllers: [],
  providers: [
      ...dao,
      ...service
  ],
  exports:service
})
export class InfrastructureModule {}
